package com.surrey.p2p.view;

import java.awt.geom.Point2D;

import org.apache.commons.collections15.Transformer;

import com.surrey.p2p.model.CANNode;
import com.surrey.p2p.model.Point;

public class LocationTransformer implements Transformer<CANNode, Point2D> {
	
	@Override
	public Point2D transform(CANNode arg0) {
		Point centre = arg0.getZone().getCentre();
		//System.out.println(arg0 + "   " +centre);
		Point2D point=new Point2D.Double(centre.getX()*500,(500- centre.getY()*500));
		//System.out.println(arg0 + "   " +point);
		return point ;
	}
	
}
